LotusScript Doc

LotusScript library: LSALibAddrReadUDFParameter

Options
Public
Declare

Uses
LSAOrgaBasics

Global variables
Private Const PARAM_ATTRIBUTE_MAPPING = "AttributeMapping"
Private Const PARAM_LABEL_FORMATS = "LabelFormat"
Private Const PARAM_OPENING_FORMATS = "LSAAddrOpeningFormats"
Private Const PARAM_CLOSING_FORMATS = "LSAAddrClosingFormats"
Private Const PARAM_CONTACT_FORMAT = "LSAAddrContactReference"
Private Const PARAM_ORGANIZATION_FORMAT = "LSAAddrOrganizationReference"
Private Const PARAM_PHONE_FORMAT = "LSAAddrPhoneFormat"
Private Const PARAM_PERSONAL_FORMAT = "LSAAddrPersonalExportFormat"
Private Const PARAM_SERIAL_EXPORT_FORMATS = "LSAAddrSerialExportFormat"
Private Const PARAM_ADDR_GLOSSARY_ALIAS = "LSAGlosUseAlias"
Private Const PARAM_COUNTRIES_WITHOUT_AREACODE = "LSAAddrPhoneCountryCodesWithoutArea"
Private Const PARAMTYPE_SINGLE = 1
Private Const PARAMTYPE_PAIR = 2
Private Const PARAMTYPE_TRIPLE = 3
Private Const DATATYPE_NONE = 0
Private Const DATATYPE_TEXT = 1
Private Const DATATYPE_NUMBER = 2
Private Const DATATYPE_DATE = 3
Private Const DATATYPE_TIME = 4
Private Const DATATYPE_DATETIME = 5
Private Const DEFAULT_CONTACT_DISPLAY_RULE = "[<Title>;<Title> ][<FirstName>;<FirstName> ]<LastName>"
Private Const DEFAULT_ORGANIZATION_DISPLAY_RULE = "<Organization>"

The functions of this libraries encapsulate the udf parameters calls to LSAConfigure. Type checking and error handling are done.

Author:
LPS EMEA
Version:
1.2, 25.JUL.2000
History:
25.JUL.2000ErrPreparechanged in all functions
25.JUL.2000newfunction getCountryCodesWhithoutArea added


Method Summary
Function getAddrGlossaryAlias (db As NotesDatabase) As String
Function GetAttributeArray (db As NotesDatabase) As Variant
Sub GetClosingFormatS (db As NotesDatabase, closingTypeS As Variant, closingDataS As Variant)
Function GetContactDisplayRule (db As NotesDatabase) As String
Function getCountryCodesWithoutArea (db As NotesDatabase) As Variant
Sub GetLabelFormatS (db As NotesDatabase, labelTypeS As Variant, labelDataS As Variant)
Sub GetOpeningFormats (db As NotesDatabase, openingTypeS As Variant, openingDataS As Variant)
Function GetOrganizationDisplayRule (db As NotesDatabase) As String
Sub GetParam (db As NotesDatabase, col1 As Variant, ParamDataTypeCol1 As Integer, col2 As Variant, ParamDataTypeCol2 As Integer, col3 As Variant, ParamDataTypeCol3 As Integer, ParamName As String, ParamElemType As Integer)
Sub GetPersonalExportFormat (db As NotesDatabase, formatType As String, formatData As String)
Function GetPhoneFormat (db As NotesDatabase) As String
Sub GetSerialExportFormat (db As NotesDatabase, formatTypeS As Variant, formatDataS As Variant)

Method Detail

GetParam

Public Sub GetParam(db As NotesDatabase,col1 As Variant,ParamDataTypeCol1 As Integer,col2 As Variant,ParamDataTypeCol2 As Integer,col3 As Variant,ParamDataTypeCol3 As Integer,ParamName As String,ParamElemType As Integer)
This script provides various error handling procedures to prevent application errors in conjunction with parameter changes. The following coding is used for datatype specification: 1=Text, 2=Number, 3=Date, 4=Time, 5=DateTime

Parameters:
col1VariantContains the first parameter that is returned or empty
col2VariantContains the second parameter is returned or empty
col3VariantContains the third parameter that is returned or empty
ParamDataTypeCol1Integerencoded datatype for col1
ParamDataTypeCol2Integerencoded datatype for col2
ParamDataTypeCol3Integerencoded datatype for col3
ParamNameStringname of the parameter
ParamElemTypeInteger1 = Single, 2 = Pair, 3 = Triple
Errors:
ErrWrongFunctionCallthrown, if the parameter contain invalid data
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

GetAttributeArray

Public Function GetAttributeArray(db As NotesDatabase) As Variant
Opens an udf session according to the database passed in as parameter and tries to read the parameter "AttributeMapping" from Configure. The values of the Configure parameter are returned as 2-dimensional array: index,0 = name of the attribute for all index between 0 and UBound index,1 = query to map data for all index between 0 and UBound Uses the "GetParam" subroutine to locate the parameter.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
Returns:
Variant2-dimensional arrray
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

GetLabelFormatS

Public Sub GetLabelFormatS(db As NotesDatabase,labelTypeS As Variant,labelDataS As Variant)
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LabelFormat" from Configure. The values of the Configure parameter are returned by modifying the parameters labelTypeS and labelDataS.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
labelTypesVariantreturn value for the first column of the searched Configure parameter
labelFormatsVariantreturn value for the second column of the searched Configure parameter
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

GetContactDisplayRule

Public Function GetContactDisplayRule(db As NotesDatabase) As String
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LSAAddrContactRefernce" from Configure. Uses the "GetParam" subroutine to locate the parameter.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
Returns:
Stringformatting rule which can be used with VExpand function
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

GetOrganizationDisplayRule

Public Function GetOrganizationDisplayRule(db As NotesDatabase) As String
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LSAAddrOrganizationRefernce" from Configure. Uses the "GetParam" subroutine to locate the parameter.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
Returns:
Stringformatting rule which can be used with VExpand function
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

GetPhoneFormat

Public Function GetPhoneFormat(db As NotesDatabase) As String
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LSAAddrPhoneFormat" from Configure. Uses the "GetParam" subroutine to locate the parameter.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
Returns:
Stringformatting rule which can be used with VExpand function
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

GetPersonalExportFormat

Public Sub GetPersonalExportFormat(db As NotesDatabase,formatType As String,formatData As String)
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LSAAddrPersonalExportFormat" from Configure. The values of the Configure parameter are returned by modifying the parameters formatType and formatData. Uses the "GetParam" subroutine to locate the parameter.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
formatNameStringname for the formatting rule
formatFormulaStringformatting rule which can be used with VExpand function
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

GetSerialExportFormat

Public Sub GetSerialExportFormat(db As NotesDatabase,formatTypeS As Variant,formatDataS As Variant)
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LSAAddrSerialExportFormatS" from Configure. The values of the Configure parameter are returned by modifying the parameters formatTypeS and formatDataS.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
formatTypesVariantreturn value for the first column of the searched Configure parameter
formatDataSVariantreturn value for the second column of the searched Configure parameter
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

GetOpeningFormats

Public Sub GetOpeningFormats(db As NotesDatabase,openingTypeS As Variant,openingDataS As Variant)
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LSAAddrOpeningFormats" from Configure. The values of the Configure parameter are returned by modifying the parameters openingTypeS and openingDataS.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
openingTypesVariantreturn value for the first column of the searched Configure parameter
openingFormatsVariantreturn value for the second column of the searched Configure parameter
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

GetClosingFormatS

Public Sub GetClosingFormatS(db As NotesDatabase,closingTypeS As Variant,closingDataS As Variant)
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LSAAddrClosingFormatS" from Configure. The values of the Configure parameter are returned by modifying the parameters closingTypeS and closingDataS.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
labelTypesVariantreturn value for the first column of the searched Configure parameter
labelFormatsVariantreturn value for the second column of the searched Configure parameter
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

getAddrGlossaryAlias

Public Function getAddrGlossaryAlias(db As NotesDatabase) As String
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LSAAddrGlossary" from Configure. Uses the "GetParam" subroutine to locate the parameter.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
Returns:
Stringformatting rule which can be used with VExpand function
History:
25.JUL.2000RGRErrPrepare changed
Summmary Top

getCountryCodesWithoutArea

Public Function getCountryCodesWithoutArea(db As NotesDatabase) As Variant
Opens an udf session according to the database passed in as parameter and tries to read the parameter "LSAAddrClosingFormatS" from Configure. The values of the Configure parameter are returned by modifying the parameters closingTypeS and closingDataS.

Parameters:
dbNotesDatabasedatabase which is used to open the udf session
Returns:
VariantList of country codes which do not need an area code.
Summmary Top

TopLotusScript Doc
© Lotus Professional Services
generated on : 05-Apr-01 8:40:00 AM